
package com.springboot.rmq.consumer.bean;


import com.springboot.rmq.consumer.MsgHandle;


public class MsgConfigBean {

    /**
     * MsgConfigBean的标识
     */
    private String beanFlag;
    /**
     * 主题
     */
    private String toppic;
    /**
     * 关键字
     */
    private String key;

    /**
     * 标签
     */
    private String tags;

    private String selfConsumer;//是否本机消费

    /**
     * 是否使用顺序消息
     */
    private boolean order;

    /**
     * consumer组名称
     */
    private String groupName;
    /**
     * consumer最小线程数
     */
    private int consumerThreadCountMin;
    /**
     * consumer最大线程数
     */
    private int consumerThreadCountMax;

    /**
     * consumer批量读取最大条数
     */
    private int consumeMessageBatchMaxSize;

    /**
     * 实例名称
     */
    private String instanceName;


    /**
     * nameserver地址
     */
    private String nameAddr;

    /**
     * aaa
     */
    private Class<?> handle;

    /**
     * 消费者实例
     */
    private MsgHandle msgHandle;

    public String getBeanFlag() {
        return beanFlag;
    }

    public void setBeanFlag(String beanFlag) {
        this.beanFlag = beanFlag;
    }

    public String getToppic() {
        return toppic;
    }

    public void setToppic(String toppic) {
        this.toppic = toppic;
    }
    public String getSelfConsumer() {
        return selfConsumer;
    }

    public void setSelfConsumer(String selfConsumer) {
        this.selfConsumer = selfConsumer;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public boolean isOrder() {
        return order;
    }

    public void setOrder(boolean order) {
        this.order = order;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public int getConsumerThreadCountMin() {
        return consumerThreadCountMin;
    }

    public void setConsumerThreadCountMin(int consumerThreadCountMin) {
        this.consumerThreadCountMin = consumerThreadCountMin;
    }

    public int getConsumerThreadCountMax() {
        return consumerThreadCountMax;
    }

    public void setConsumerThreadCountMax(int consumerThreadCountMax) {
        this.consumerThreadCountMax = consumerThreadCountMax;
    }

    public int getConsumeMessageBatchMaxSize() {
        return consumeMessageBatchMaxSize;
    }

    public void setConsumeMessageBatchMaxSize(int consumeMessageBatchMaxSize) {
        this.consumeMessageBatchMaxSize = consumeMessageBatchMaxSize;
    }

    public String getNameAddr() {
        return nameAddr;
    }

    public void setNameAddr(String nameAddr) {
        this.nameAddr = nameAddr;
    }

    public Class<?> getHandle() {
        return handle;
    }

    public void setHandle(Class<?> handle) {
        this.handle = handle;
    }

    public MsgHandle getMsgHandle() {
        return msgHandle;
    }

    public void setMsgHandle(MsgHandle msgHandle) {
        this.msgHandle = msgHandle;
    }

    public String getInstanceName() {
        return instanceName;
    }

    public void setInstanceName(String instanceName) {
        this.instanceName = instanceName;
    }

    /**
     * 重新tostring方法
     *
     * @return
     */
    @Override
    public String toString() {
        StringBuffer str = new StringBuffer();
        str.append("toppic:[").append(toppic).append("]\r\n")
                .append("key:[").append(key).append("]\r\n")
                .append("tags:[").append(tags).append("]\r\n")
                .append("order:[").append(order).append("]\r\n")
                .append("groupName:[").append(groupName).append("]\r\n")
                .append("instanceName:[").append(instanceName).append("]\r\n")
                .append("nameAddr:[").append(nameAddr).append("]\r\n")
                .append("consumerThreadCountMin:[").append(consumerThreadCountMin).append("]\r\n")
                .append("consumerThreadCountMax:[").append(consumerThreadCountMax).append("]\r\n")
                .append("consumeMessageBatchMaxSize:[").append(consumeMessageBatchMaxSize).append("]\r\n")
                .append("handle:[").append(handle.toString()).append("]\r\n");
        return str.toString();

    }
}
